import { PropEditor, PropEditorState, Component } from "maishu-jueying";
import React = require("react");
import { StoreCouponsState, StoreCoupons } from "./component";


export class StoreCouponsEditor extends PropEditor<PropEditorState<Coupon[]>, Coupon[]>{
    render() {
        let coupons = this.props.value || [];
        return <>
            {coupons.map(c =>
                <div>{c.Title}</div>
            )}
        </>
    }
}

// let couponsProp: keyof StoreCouponsState = "coupons";
// Component.setStateEditor({
//     propName: couponsProp,
//     componentType: StoreCoupons,
//     editorType: StoreCouponsEditor
// })